-- GENERATED SPELL FOR [Wyrmcult Poacher] --


function spell0_21809(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(6533,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21809', 2269, 1)
end

function spell1_21809(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15547,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21809', 504, 1)
end

function spell2_21809(pUnit, Event) --@Wyrmcult BroodlingCall,Self--
pUnit:FullCastSpellOnTarget(37547,pUnit)
pUnit:RegisterEvent('Sorts_21809', 600, 1)
end

function Sorts_21809(pUnit, Event)
local choix_sorts_21809 = math.random(0, 2)
if choix_sorts_21809 == 0 then
pUnit:RegisterEvent('spell0_21809', 1, 1)
end
if choix_sorts_21809 == 1 then
pUnit:RegisterEvent('spell1_21809', 1, 1)
end
if choix_sorts_21809 == 2 then
pUnit:RegisterEvent('spell2_21809', 1, 1)
end
end

function mob21809_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21809', math.random(1500, 3000), 1)
end

function mob21809_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21809_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21809_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21809, 1, 'mob21809_Action')
RegisterUnitEvent(21809, 2, 'mob21809_Leave')
RegisterUnitEvent(21809, 3, 'mob21809_Kill')
RegisterUnitEvent(21809, 4, 'mob21809_Die')
